﻿using System;
using System.Windows;
using System.Windows.Browser;
using System.Windows.Controls;

namespace MedLink2011.Controls
{
    public partial class ToolTipContentControl : UserControl
    {
        public event EventHandler<EventArgs> CancelClose;
        public event EventHandler<EventArgs> DoClose;

        public event EventHandler<EventArgs> CloseWindow;

        //public NWUserControl CurrentUserControl;


        public ToolTipContentControl()
        {
            InitializeComponent();

        }

        private void close_Click(object sender, RoutedEventArgs e)
        {
            CloseWindow(sender, e);
        }

        private void HyperLink_LaunchSingleSiteView_Click(object sender, RoutedEventArgs e)
        {
            //((App)App.Current).EnergyExpertCurrentStateManager.SelectByBuildingId(Convert.ToInt32(((HyperlinkButton)sender).Tag.ToString().Split('|')[0].ToString()), ((HyperlinkButton)sender).Tag.ToString().Split('|')[1].ToString());
            ;
        }



        //private void UserControl_MouseEnter(object sender, MouseEventArgs e)
        //{
        //    CancelClose(sender, e);
        //}

        //private void UserControl_MouseLeave(object sender, MouseEventArgs e)  
        //{
        //    DoClose(sender, e);
        //}
    }
}
